<?php
include 'mysqlconnect.php';
$params = array(
    'hostname' => '127.0.0.1',
    'dbname' => 'level',
    'username' => 'root',
    'password' => ''
);
$connect = new mysqlconnect($params);
$connect->connect();
$images = $connect->fetch('select filename from bg_image where menu_id=6 order by order_id');
$career = $connect->fetch('select * from career');
for ($i = 0; $i < count($career); $i++) {
    $career[$i]['job_describe'] = explode('~!~', $career[$i]['job_describe']);
    $career[$i]['job_requirement'] = explode('~!~', $career[$i]['job_requirement']);
}
?>
<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="src/css/index.css">
        <script type="text/javascript" src = "src/js/jquery-1.7.1.js"></script>
        <script type="text/javascript" src = "src/js/career.js"></script>
    </head>
    <body>
        <div class = "about-container" id = "career">
            <div class = "background-img">
                <div class = "for-left-nav"></div>
                <div class = "left-nav">
                    <div class = "nav-top">
                        <div class = "menu">
                            <a href="javascript:;" href ="/index.php">MENU</a>
                        </div>
                        <div class = "logo">
                            <a href="index.php"><img src="res/logo.png"></a>
                        </div>
                    </div>
                    <div class = "nav-bottom">
                        <div class = "level-pager">
                            <span></span><p class = "pager-chinese">职业生涯</p><p class = "pager-english">CAREER</p>
                        </div>
                        <ul id="nav">
                            <i></i><li><a href="aboutLevel.php">LEVEL</a><p>力洋</p></li>
                            <i></i><li><a href="news.php">NEWS</a><p>新闻</p></li>
                            <i></i><li><a href="service.php">SERVICES</a><p>服务</p></li>
                            <i></i><li><a href="cases.php">CASES</a><p>案例</p></li>
                            <i></i><li id="selected"><a href="career.php">CAREER</a><p>职业</p></li>
                        </ul>
                        <div class = "footer">
                            <div class = "contact">
                                <a href="aboutLevel.php">CONTACT<i></i></a>
                            </div>
                            <div class = "appendix">
                                <a href="mailto:info@leveldisplay.com">
                                    <img class = "appendix-img" src="res/appendix.png">
                                </a>
                                <a href="http://e.weibo.com/LEVELDISIGN"><img class = "weibo-img" src="res/weibo.png"></a>
                                <img class = "weixin-img" src="res/weixin.png">
                                <img  class = "code-for-weixin"src="res/code.jpg" style = "width:200px;height:200px;">
                                <p>Copyrights Reserved tacheworks Design(China)Ltd.</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class = "float-div">
                    <ul class = "about-list">
                        <?php for($i=0;$i<count($career);$i++) { ?>
                        <li class = "about-item">
                            <div class = "rec-header li-title">
                                <a href="javascript:;" class = "title-href<?php if ($i==0) echo ' opened' ?>"><p class = "sub-title"><?php echo $career[$i]['title'] ?></p><em class = "show-info-btn">-</em></a>
                                <a href="mailto:info@leveldisplay.com" class = "accept">
                                    <img class = "appendix-img" src="res/appendix.png">
                                </a>
                            </div>
                            <div class = "<?php if ($i==0) echo 'rec-context li-content';else echo 'li-content career-item'.$i ?>">
                                <div class = "chinese-text">
                                    <span><p>岗位名称：<?php echo $career[$i]['title']?></p><p class = "second-p">所属部门：<?php echo $career[$i]['department']?></p></span>
                                    <span><p>直属上级：<?php echo $career[$i]['superior']?></p><p class = "second-p">直属下级：<?php echo $career[$i]['subordinate']?></p></span>
                                    <span>岗位职责</span>
                                    <?php for($j=0;$j<count($career[$i]['job_describe']);$j++) { ?>
                                    <span><?php echo ($j+1).'、'.$career[$i]['job_describe'][$j] ?></span>
                                    <?php } ?>
                                    <span class = "needed">任职资格</span>
                                    <?php for($j=0;$j<count($career[$i]['job_requirement']);$j++) { ?>
                                    <span><?php echo ($j+1).'、'.$career[$i]['job_requirement'][$j] ?></span>
                                    <?php } ?>
                                </div>
                            </div>
                        </li>
                        <?php } ?>
                        <li class = "about-item">
                            <div class = "staff-header li-title">
                                <a href="javascript:;" class = "title-href"><p class = "career-big-title" style="margin-left: 11px">STAFF TRAINING</p><p class = "sub-title">员工培训</p><em class = "show-info-btn">+</em></a>
                            </div>
                            <div class = "staff-context li-content career-item7">
                                <div class = "chinese-text">
                                    <p>我们力求成为您最为值得信赖的合作伙伴，使您最为祈盼的全方位、高品质、专业化的服务转化为眼前的现实与惊喜。我们在协同架构客户理念的同时，努力寻求每一次值得认可的完美与超越。</p>
                                </div>
                                <div class = "english-text">
                                    <p>On all levels you can expect professionalism, quality, and service. You can trust level as a partner in creating your vision, building your image and delivering more than you can imagine every time。</p>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class = "staf-max">
                <img src="res/staff.jpg">
                <a href="javascript:;" class = "staff-hide"></a>
            </div>
            <footer>
                <div id = "progress-back">
                    <div id = "progress-bar"></div>
                </div>
            </footer>
        </div>
        <ul id = "surprised">
            <?php
            for ($i = 0; $i < count($images); $i++) {
                ?>
                <li class = "slide-0<?php echo $i + 1; ?>">
                    <img src="bg_image/<?php echo $images[$i]['filename'] ?>">
                </li>
<?php } ?>
        </ul>
        <script type="text/javascript" src="src/js/jquery-ui.min.js"></script>
        <script type="text/javascript" src="src/js/jquery.spasticNavForCareer.js"></script>	
        <script type="text/javascript">
            $('#nav').spasticNav();
        </script>
    </body>
</html>
